package cn.huolabao.controller;

import cn.huolabao.common.core.utils.R;
import cn.huolabao.service.SysRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/role")
@RequiredArgsConstructor
@Slf4j
@Api(tags = "角色管理")
public class RoleController {
    private final SysRoleService roleService;

    @GetMapping("/list")
    @ApiOperation(value = "获取角色列表", httpMethod = "POST")
    public R list() {
        return R.ok(roleService.list());
    }
}
